package com.snatch.deal.shop.store.mapper;

import com.snatch.deal.shop.store.model.ShopStock;
import org.apache.ibatis.annotations.Mapper;

/**
 * Created by hao.g on 18/5/15.
 */
@Mapper
public interface ShopStockMapper {
    /**
     * 查询库存
     * @param stockId
     * @return
     */
    ShopStock getStockCount(Long stockId);

    /**
     * 库存减一
     * @param shopStock
     * @return
     */
    int reduceOneStock(ShopStock shopStock);
}
